import unittest
import app
import time

from script.test_ihrm_emp_manage_params import TestEmpManageParams
from script.test_ihrm_login_params import TestIHRMLParams
from lib.HTMLTestRunner2 import HTMLTestRunner

suite = unittest.TestSuite()

suite.addTest(unittest.makeSuite(TestIHRMLParams))
suite.addTest(unittest.makeSuite(TestEmpManageParams) )
report_name = app.BASE_PATH + "/report/ihrm{}.html".format(time.strftime("%Y-%m-%d %H-%M-%S"))
with open(report_name, "wb") as f:
    # runner = HTMLTestRunner(f)
    runner = HTMLTestRunner(stream=f,title="iHRM管理系统的测试报告")
    runner.run(suite)
